<ol class="breadcrumb">
    <li><a href="{{app_context}}/app">{{__ "Home"}}</a></li>
    <li><a href="{{app_context}}/app/{{conn_name}}">{{conn_name}}</a>&nbsp;({{__ "connection"}})</li>
    <li><a href="{{app_context}}/app/{{conn_name}}/{{db_name}}">{{db_name}}</a>&nbsp;({{__ "database"}})</li>
    <li><a href="{{app_context}}/app/{{conn_name}}/{{db_name}}/{{coll_name}}/view">{{coll_name}}</a>&nbsp;({{__ "collection"}})</li>
</ol>
<div class="col-lg-12">
    <a href="{{app_context}}/app/{{conn_name}}/{{db_name}}/{{coll_name}}/view" class="btn btn-warning btn-sm pull-left action_button">{{__ "Back"}}</a>
    <button class="btn btn-success btn-sm pull-right action_button" id="coll_addindex">{{__ "Add index"}}</button>
</div>
<div class="col-lg-10">
    <div class="index_json" id="json">{}</div>
</div>
<div class="col-lg-2">
    <div class="text-center">
        <h4>{{__ "Options"}}</h4>
        <div class="checkbox">
            <label>
                <input type="checkbox" id="index_unique" checked> {{__ "Unique"}}?
            </label>
        </div>
        <div class="checkbox">
            <label>
                <input type="checkbox" id="index_sparse" checked> {{__ "Sparse"}}?
            </label>
        </div>
    </div>
</div>
<div class="col-lg-12">
    <table class="table table-bordered index-table">
        <th>{{__ "Name"}}</th>
        <th>{{__ "Key"}}</th>
        <th>{{__ "Unique"}}</th>
        <th>{{__ "Sparse"}}</th>
        <th>{{__ "Action"}}</th>
        {{#each coll_indexes}}
            <tr id="index_row_{{@index}}">
                <td>{{this.name}}</td>
                <td>{{{toJSON this.key}}}</td>
                <td>{{niceBool this.unique}}</td>
                <td>{{niceBool this.sparse}}</td>
                <td><button class="btn btn-danger btn-sm" onclick="dropIndex('{{@index}}');">{{__ "Delete index"}}</button></td>
            </tr>
        {{/each}}
    </table>
</div>